#pragma once
#include <osg/PrimitiveSet>

#include "Ent.h"

class JsonReader;

struct LineStrip3DPrivate;
class LineStrip3D : public Ent3DCurve
{
	Q_OBJECT
public:
	LineStrip3D(INode* parent);
	void setPoints(const std::vector<osg::Vec3d> &pos);
	void setColor(const osg::Vec4 &color);
	const std::vector <osg::Vec3d>& getPoints() const;
	const osg::Vec4& color() const;
	virtual void update3D() override;
	virtual osg::Node* getRep3D() const override;
	virtual void setSelected(bool val) override;
	virtual void save(QJsonObject &json) const;
	virtual void load(const QJsonObject& json, JsonReader& reader);
	virtual void move(const osg::Vec3d& offset) override;
	virtual void scale(const osg::Vec3d& center, double scale) override;
	virtual std::vector<osg::Vec3d> handles() const override;
	virtual void stretch(int index, const osg::Vec3d &offset) override;
	virtual std::shared_ptr<Ent> clone() const override;
	virtual bool explode(std::vector<std::shared_ptr<Ent>>& result) const override;
	virtual void copy(const Ent& ent) override;
	virtual std::vector<Handle(Geom_Curve)> getCurve3d() const override;
	virtual void rotate(const double angle, const osg::Vec2d& basePoint) override;

	LEAF_METHODS;
protected:
	LineStrip3DPrivate* d_ptr;
};